<HTML>

<BODY BGCOLOR="white">

<center>
<FONT SIZE=+2 COLOR="#BB0000">CS346 - Spring 2014<BR>Database System Implementation</FONT>

<p>
<table border=0 cellpadding=4 cellspacing=10 width="100%">
<tr><td width="100%" bgcolor="#ccccff"><font face="Arial">
<center><b>RedBase Project</b></center>
</font></td></tr>
</table>

<b><a href="rbfaq.html">Project FAQ</a> (look here first!)</b>

<p>
<TABLE BORDER=3>
<TR><TH>Project Part<TH>Handout<TH>Due Date

<TR><TD>Paged File Component
<TD><a href="pf.html">PF Specification</a>
<TD>supplied

<TR><TD>Record Management Component
<TD><a href="rm.html">RM Specification</a>
<TD>Sunday April 13

<TR><TD>Indexing Component
<TD><a href="ix.html">IX Specification</a>
<TD>Sunday April 27

<TR><TD>System Management Component
<TD><a href="sm.html">SM Specification</a>
<TD>Sunday May 11

<TR><TD>Query Language Component
<TD><a href="ql.html">QL Specification</a>
<TD>Sunday May 25

<TR><TD>Personal Extension
<TD><a href="ex.html">EX Specification</a>
<TD>Proposal due Wed. May 14<br>
Demos Fri. June 6

</TABLE>

<br>

<TABLE BORDER=3>
<TR><TH>Supporting Documents

<tr><td><a href="logistics.html">Logistics: Setting Up, Testing, Submission Process,
and Grading</a><br>

<tr><td><a href="valgrind.html">Using Valgrind</a><br>

<tr><td><a href="memory.html">Policy on memory use</a><br>

<tr><td><a href="statistics.html">RedBase Statistics Tracker</a> (optional)

</table>
</center>

<p>
<table border=0 cellpadding=4 cellspacing=10 width="100%">
<tr><td width="100%" bgcolor="#ccccff"><font face="Arial">
<center><b>Project Overview</b></center>
</font></td></tr>
</table>

The focal point of the course is the <i>RedBase</i> project.  RedBase
stands for Relational Database, and also alludes to Stanford's
color. <small>(We know, Stanford's color is really Cardinal, but
CardBase doesn't have as much of a ring to it.)</small> RedBase is a
complete single-user relational database management system.  It
involves a significant amount of coding, and the project must be
completed by each individual student -- teams are not permitted.  The
project is highly structured, but there is enough slack in the
specification so that creativity is both allowed and required.  The
basic project is divided into four parts:

<ol>

<li> <i>The Record Management (RM) Component:</i> In this part you
will implement a set of functions for managing unordered files of
database records.  This component will rely on a <i>Paged File (PF)</i>
component that we will provide.  The Paged File component performs
low-level file I/O at the granularity of pages.

<p><li> <i>The Indexing (IX) Component:</i> In this part you will
implement a facility for building indexes on records stored in
unordered files.  Your indexing facility will be based on B+ trees.
The Indexing component will rely on the Paged File component.

<p><li> <i>The System Management (SM) Component:</i> In this part you will
implement various database and system utilities, including data
definition commands and catalog management.  The System Management
component will rely on the Record Management and Indexing components
from Parts 1 and 2.  It also will use a command-line parser, which we
will provide.

<p><li> <i>The Query Language (QL) Component:</i> In this part you will
implement RQL -- the RedBase Query Language.  RQL consists of
user-level data manipulation commands, both queries and updates.  The
Query Language component will rely on the three components from Parts
1-3, and it will use the command-line parser that we are providing.

</ol>

In addition to the basic project, each student will design and
implement a significant extension to RedBase.  We expect that students
will get ideas about extensions as the course progresses.
Possibilities include aspects of record management, long fields
(BLOBs), object management, text management, sorting, indexing, join
algorithms, clustering, statistics and query optimization, query
language extensions, OLAP, XML, concurrency control, recovery,
security and authorization, compression, networking, versioning,
external functions, stored procedures, views, integrity constraints,
triggers, user and application interfaces, web integration, etc.
(We're certainly open to additional suggestions.)  Each student will
submit a proposal for their project extension.  Students will get
feedback on their proposal, then will implement their extension as the
fifth and final part of the project.  Complete projects will be
demonstrated to the instructors during finals week.

<!--
<a name="helpsession">
<p>
<table border=0 cellpadding=4 cellspacing=10 width="100%">
<tr><td width="100%" bgcolor="#ccccff"><font face="Arial">
<center><b>Project Help Sessions</b></center>
</font></td></tr>
</table>

There will be a help session at 5:30 PM each
Wednesday evening preceding the Sunday due-date for Parts 1-4a,4b of the
basic RedBase project. The purpose of the help sessions is to discuss design
decisions for each project part and to answer commonly-asked
programming-related questions in a group setting. The help sessions
are <i>not</i> required, and good students should have no trouble
completing the project without attending the help sessions.
-->

<p>
<a name="contest">
<table border=0 cellpadding=4 cellspacing=10 width="100%">
<tr><td width="100%" bgcolor="#ccccff"><font face="Arial">
<center><b>RedBase I/O Efficiency Contest</b></center>
</font></td></tr>
</table>

As the old saying goes, the three most important aspects of a database
management system are efficiency, efficiency, and efficiency.  To
encourage you to take efficiency into consideration as you develop
your RedBase system, we will be conducting a <i> RedBase Efficiency
Contest</i> when the QL component is complete.  While there are
several important efficiency measures in a DBMS, we will focus on I/O
performance.  We will measure each student's RedBase system on a set
of benchmark queries and updates in the RQL language and will count
the number of I/O's -- the fewer the better, of course.  All students
enter the contest automatically when they submit their QL component,
unless they prefer to be excluded.  The prizes are:

<ul>

<li> <b>First prize:</b> 10% boost in overall project score and an
official Stanford InfoLab T-shirt.

<p><li> <b>Second prize:</b> 5% boost in overall project score and an
official Stanford InfoLab T-shirt.

<p><li> <b>Third prize:</b> An official Stanford InfoLab T-shirt.

</ul>

<p>
<a name="late">
<table border=0 cellpadding=4 cellspacing=10 width="100%">
<tr><td width="100%" bgcolor="#ccccff"><font face="Arial">
<center><b>Late Policy</b></center>
</font></td></tr>
</table>

The late policy follows.  <i>There will be absolutely no exceptions to
this late policy, so please don't even ask!  It's crucial that
students stay on schedule in this course -- RedBase is a very big
project.</i>

<ul>

<li> The due dates for project parts 1-4 are on Sundays.  Project
parts are due at 11:59 PM on the due date. For project parts submitted
after 11:59 PM on the due date, there is a 1% penalty applied to that
project part score for each hour late.  For example, if you submit
your project part on Tuesday at 8:00 AM, it will be 32 hours late and
will incur a 32% penalty on that part.

<p><li> Your project extension (Part 5) proposal is due on a Wednesday at
11:59 PM. Like project parts, proposals submitted late incur a 1%
penalty on the proposal score for each hour late.

<p><li>We realize that occasionally dire circumstances arise. To cover
emergencies, each student is allocated 2 free late days and 12 free late hours for the
entire course with no penalty. Once the free days and hours have been used,
penalties begin to be applied as described above.

<p><li> The final demonstrations of your project will be scheduled in
half-hour slots on Thu.-Fri. the week before finals week. All students must
complete their projects by demo time.

</ul>

<p>
<table border=0 cellpadding=4 cellspacing=10 width="100%">
<tr><td width="100%" bgcolor="#ccccff"><font face="Arial">
<center><b>Computer Accounts</b></center>
</font></td></tr>
</table>

You will implement RedBase using the Linux machines in the <a
    href="http://farmshare.stanford.edu">FarmShare cluster</a> (the
<tt>corn</tt>'s, <tt>cardinal</tt>'s, <tt>myth</tt>'s, etc.).
Directory
<tt>/usr/class/cs346</tt> will contain files and subdirectories for
the class.

<p>Students with access to their own workstations or Linux PCs are
welcome to try to use them, but you will need to copy all provided
software from the Stanford FarmShare machines.  While we will do our best to
ensure that the code we provide is portable, we cannot guarantee
portability across all platforms.  Likewise, while we may attempt
to help with platform-specific problems, our focus will be on the
Linux machines.

<p>Your programs will be submitted electronically and they will be
tested on a <tt>corn</tt> machine.  It will be your
responsibility to ensure that your programs compile and run correctly
on that platform before submitting them.

<p>
<table border=0 cellpadding=4 cellspacing=10 width="100%">
<tr><td width="100%" bgcolor="#ccccff"><font face="Arial">
<center><b>More on Programming</b></center>
</font></td></tr>
</table>

We will provide code for the Paged File (PF) component of RedBase and
for some commonly-used routines in other components.  We will also
provide a command-line parser that you will use for Parts 3 and 4 of
the project.  Specifications for the code we provide, along with
specifications for each component that you will implement, will be
given as object-oriented interfaces in the C++ programming language.

We will help you get started with your programming by providing sample
Makefiles, header files, etc.  In addition, for some of the project
parts we will provide test suites in advance of the due date, although
these tests will not be comprehensive.

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=5642523; 
var sc_invisible=1; 
var sc_partition=60; 
var sc_click_stat=1; 
var sc_security="b2aed00b"; 
</script>

<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script><noscript><div
class="statcounter"><a title="wordpress hit counter"
href="http://www.statcounter.com/wordpress.com/"
target="_blank"><img class="statcounter"
src="http://c.statcounter.com/5642523/0/b2aed00b/1/"
alt="wordpress hit counter" ></a></div></noscript>
<!-- End of StatCounter Code -->


</BODY>
